package com.weizicheng.test;

import com.alibaba.druid.pool.DruidDataSource;
import com.weizicheng.service.Impl.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserTset {

    @Test
    public void test01(){
        ClassPathXmlApplicationContext cp = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserServiceImpl userService = cp.getBean("userService", UserServiceImpl.class);
        userService.save();

    }

    @Test
    public void test02(){
        ClassPathXmlApplicationContext cp = new ClassPathXmlApplicationContext("applicationContext.xml");
        DruidDataSource dataSource = cp.getBean("dataSource", DruidDataSource.class);
        System.out.println(dataSource);
    }
}
